package day16.udp中加入组播;

import java.io.IOException;
import java.net.*;

public class send {
    public static void main(String[] args) throws IOException {
        DatagramSocket da=new DatagramSocket();
        String s="hello，组播";
        byte[] bytes=s.getBytes();
        InetAddress address=InetAddress.getByName("224.0.1.0");
        int port=10001;
        DatagramPacket dp=new DatagramPacket(bytes,bytes.length,address,port);
        da.send(dp);
        da.close();
    }
}
